Write a program that generates a Fibonacci sequence up to a given number 'n'. The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones.